package com.mxx.common.netty.http.resolvers;

import com.mxx.common.netty.http.NettyMethod;
import com.mxx.common.netty.http.NettyMethodParameter;
import com.mxx.common.netty.http.NettyHttpRequest;

import java.io.IOException;

/**
 * @Auther: Mr. Zeng
 * @Date: 2020/8/4 11:10
 * @Description: 暂无描述
 */
public interface NettyResolvers {

    boolean match(NettyMethod processor, NettyMethodParameter parameter);

    Object resolvers(NettyMethod processor, NettyHttpRequest request, NettyMethodParameter parameter) throws IOException;

    default int getHashCode(NettyMethod processor, NettyMethodParameter parameter) {
        return processor.hashCode() + parameter.getParameter().hashCode();
    }


}
